package com.student.model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TeacherTitleType entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Teacher_Title_Type", schema = "dbo", catalog = "StudentManager")
public class TeacherTitleType implements java.io.Serializable {

	// Fields

	private Long teacherTitleTypeId;
	private String teacherTitleTypeName;
	private Set<Teacher> teachers = new HashSet<Teacher>(0);

	// Constructors

	/** default constructor */
	public TeacherTitleType() {
	}

	/** minimal constructor */
	public TeacherTitleType(Long teacherTitleTypeId, String teacherTitleTypeName) {
		this.teacherTitleTypeId = teacherTitleTypeId;
		this.teacherTitleTypeName = teacherTitleTypeName;
	}

	/** full constructor */
	public TeacherTitleType(Long teacherTitleTypeId,
			String teacherTitleTypeName, Set<Teacher> teachers) {
		this.teacherTitleTypeId = teacherTitleTypeId;
		this.teacherTitleTypeName = teacherTitleTypeName;
		this.teachers = teachers;
	}

	// Property accessors
	@Id
	@Column(name = "Teacher_Title_Type_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getTeacherTitleTypeId() {
		return this.teacherTitleTypeId;
	}

	public void setTeacherTitleTypeId(Long teacherTitleTypeId) {
		this.teacherTitleTypeId = teacherTitleTypeId;
	}

	@Column(name = "Teacher_Title_Type_Name", nullable = false, length = 20)
	public String getTeacherTitleTypeName() {
		return this.teacherTitleTypeName;
	}

	public void setTeacherTitleTypeName(String teacherTitleTypeName) {
		this.teacherTitleTypeName = teacherTitleTypeName;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "teacherTitleType")
	public Set<Teacher> getTeachers() {
		return this.teachers;
	}

	public void setTeachers(Set<Teacher> teachers) {
		this.teachers = teachers;
	}

}